<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateBillboardsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('billboards', function (Blueprint $table) {
            $table->increments('id');
            $table->string('title')->comment('广告名称');
            $table->string('classify')->comment('广告位置---关联adv-location中的title字段');
            $table->text('start_data')->nullable()->comment('开始日期');
            $table->text('end_data')->nullable()->comment('结束日期');
            $table->string('img_url')->nullable()->comment('广告图片');
            $table->string('link')->nullable()->comment('链接');
            $table->integer('state')->comment('开启和关闭，1表示开启，2表示关闭');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('billboards');
    }
}
